require 'cgi'
require 'json'


def encode_req desc
  CGI::escape(desc.to_json)
end


def decode_req desc
  JSON.parse(CGI::unescape(desc), :symbolize_names => true)
end
